package com.youlai.mrp.entity;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.youlai.common.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.persistence.*;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

/**
 * (bee_mrp_fccotable)实体类
 *
 * @author xiamw
 * @since 2024-02-04 18:12:33
 * @description 由 Mybatisplus Code Generator 创建
 */
@NoArgsConstructor
@Schema(description ="销售-销售订单")
@Data
@Entity
@EntityListeners(AuditingEntityListener.class)
@Table(name = "bee_mrp_fccotable", schema = "youlai_boot", catalog = "")
public class MrpFccotableEntity  extends BaseEntity {
    private static final long serialVersionUID = 1L;

    @Schema(description ="主键ID")
    @Id
    @Column(name = "mrp_fc_co_table_id", unique = true)
	private Long mrpFcCoTableId;
    /**
     * 层数 LPK
     */
    private Integer level;
    /**
     * 货号 LPK
     */
    private String itemNo;
    /**
     * 原始需求日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date originalDemandDate;
    /**
     * 原始需求数量
     */
    private Double originalDemandQty;
    /**
     * 来源
     */
    private String source;
    /**
     * 来源编号
     */
    private String sourceNo;
    /**
     * 是否完成
     */
    private Integer isFinish;

    @Schema(description ="排序")
    private Integer sort;

    @Schema(description ="状态(1:正常;0:禁用)")
    private Integer status=1;

    @Schema(description ="备注")
    private String remark;

    @Schema(description ="逻辑删除标识(0:未删除;1:已删除)")
    private Integer deleted=0;

    @JsonInclude(value = JsonInclude.Include.NON_NULL)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @CreatedDate
    @Temporal(TemporalType.TIMESTAMP)
    private Date createTime;

    private Long createBy;

    private String createName;

    private Long updateBy;

    @JsonInclude(value = JsonInclude.Include.NON_NULL)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @LastModifiedDate
    @Temporal(TemporalType.TIMESTAMP)
    private Date updateTime;

    private String updateName;
}